<template>
  <div class="detail">
    <div class="wrapper">
      <div class="box">
        <h1>{{ info.name }}</h1>
        <p class="date">{{ new Date(info.createDate) | getDate }}</p>
      </div>
      <el-divider />
      <div class="box">
        <div v-html="info.content" />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'NoticeDetail',
  data: function() {
    return {
      info: {}
    };
  },
  watch: {
    '$route'(to, from, next) {
      this.info = JSON.parse(this.$route.query.res);
    }
  },
  created() {
    this.info = JSON.parse(this.$route.query.res);
  }
};
</script>
<style lang="scss" scoped>
	.detail{
		font-size: $fontSizeBase;
		color: $textColorDark;
    background-color: #fff;
    display: flex;
    justify-content: center;
    h1{
      font-size: 22px;
      margin-bottom: 10px;
    }
	}
  .wrapper{
    width: 100%;
    padding-top: 30px;
    min-height: calc(100vh - 195px);
  }
  .box{
    width: 80%;
    margin: 0 auto;
    .date{
      color: $textColorBase;
    }
  }
</style>
